<template>
  <el-dialog
    append-to-body
    :title="title"
    :visible.sync="dialogFormVisible"
    width="500px"
    @close="close"
  >
    <el-descriptions column="1" size="medium">
      <el-descriptions-item label="员工名称">
        {{ info.staffname }}
      </el-descriptions-item>
      <el-descriptions-item label="门店名称">
        {{ info.storename }}
      </el-descriptions-item>
      <el-descriptions-item label="服务态度">
        {{ info.attitude }}
      </el-descriptions-item>
      <el-descriptions-item label="服务质量">
        {{ info.quality }}
      </el-descriptions-item>
      <el-descriptions-item label="店内环境">
        {{ info.environment }}
      </el-descriptions-item>
      <el-descriptions-item label="意见&建议">
        {{ info.feedback }}
      </el-descriptions-item>
      <el-descriptions-item label="顾客姓名">
        {{ info.username }}
      </el-descriptions-item>
      <el-descriptions-item label="顾客电话">
        {{ info.phone }}
      </el-descriptions-item>
    </el-descriptions>
    <template #footer>
      <el-button type="primary" @click="close">关 闭</el-button>
    </template>
  </el-dialog>
</template>

<script>
  export default {
    name: 'TableEdit',
    data() {
      return {
        info: {},
        title: '',
        dialogFormVisible: false,
      }
    },
    created() {
      this.fetchData()
    },
    methods: {
      showEdit(row) {
        this.title = '详情'
        this.info = Object.assign({}, row)
        this.dialogFormVisible = true
      },
      close() {
        this.dialogFormVisible = false
      },
    },
  }
</script>
